<?php
namespace application\index\controller;
use think\Controller;
use application\index\model\ApiFront;
/**
 * 接收内容推送
 */
class Api extends Controller
{
	/**
	  * 获取catid列表
	  */
	public function getCatid()
	{
		$api = new ApiFront();
		ajaxResponse('200', $api->getArticleCat());
	}
	/**
	 * 接收内容推送入口
	 */
	public function news()
	{
		$api = new ApiFront();
		$res = $api->newsPost();
		if($res) {
			ajaxResponse('200', 'success:'.$res.';'.date('Y-m-d H:i:s'));
		} else {
			ajaxResponse ($api->code, $api->message);
		}
	}

}